package com.zjj.learn.javaplus.pkg02.demo28;

public class Duck extends Fowl {
    public Duck() {
    }

    public Duck(String color, Integer age) {
        super(color, age);
    }

    @Override
    public void eat() {
        System.out.println(super.getAge() + "岁的" + super.getColor() + "的鸭子在吃饭");
    }

    public void swimming() {
        System.out.println(super.getAge() + "岁的" + super.getColor() + "的公鸡在游泳");
    }
}
